package com.lingnan.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@TableName("user") // 映射到 user 表
public class User {

    @TableId(value = "id", type = IdType.AUTO) // 主键映射
    private Long id;

    @TableField("name") // 字段映射，默认自动识别驼峰命名转下划线
    private String name;

    @TableField("age")
    private Integer age;

    @TableField("email")
    private String email;
}
